/**
 * @author liangxi
 * @since 2023/12/21
 */

#ifndef DESIGNPATTERN_PIZZASTORE1_H
#define DESIGNPATTERN_PIZZASTORE_H

#include "SimplePizzaFactory.h"

namespace Factory_SF {
    class PizzaStore {
    public:
        Factory_SF::Pizza orderPizza(const std::string &type) {
            Pizza pizza = factory.creatPizza(type);
            pizza.prepare();
            pizza.cut();
            pizza.box();
            return pizza;
        }

    private:
        //此成员可以为智能指针，已实现多态，本例不用
        Factory_SF::SimplePizzaFactory factory;
    };
}


#endif //DESIGNPATTERN_PIZZASTORE1_H
